package com.ruoyi.building.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.building.mapper.DeveloperMapper;
import com.ruoyi.building.domain.Developer;
import com.ruoyi.building.service.IDeveloperService;

/**
 * 开发商列表Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-12
 */
@Service
public class DeveloperServiceImpl implements IDeveloperService 
{
    @Autowired
    private DeveloperMapper developerMapper;

    /**
     * 查询开发商列表
     * 
     * @param developId 开发商列表主键
     * @return 开发商列表
     */
    @Override
    public Developer selectDeveloperByDevelopId(Long developId)
    {
        return developerMapper.selectDeveloperByDevelopId(developId);
    }

    /**
     * 查询开发商列表列表
     * 
     * @param developer 开发商列表
     * @return 开发商列表
     */
    @Override
    public List<Developer> selectDeveloperList(Developer developer)
    {
        return developerMapper.selectDeveloperList(developer);
    }

    /**
     * 新增开发商列表
     * 
     * @param developer 开发商列表
     * @return 结果
     */
    @Override
    public int insertDeveloper(Developer developer)
    {
        developer.setCreateTime(DateUtils.getNowDate());
        return developerMapper.insertDeveloper(developer);
    }

    /**
     * 修改开发商列表
     * 
     * @param developer 开发商列表
     * @return 结果
     */
    @Override
    public int updateDeveloper(Developer developer)
    {
        developer.setUpdateTime(DateUtils.getNowDate());
        return developerMapper.updateDeveloper(developer);
    }

    /**
     * 批量删除开发商列表
     * 
     * @param developIds 需要删除的开发商列表主键
     * @return 结果
     */
    @Override
    public int deleteDeveloperByDevelopIds(Long[] developIds)
    {
        return developerMapper.deleteDeveloperByDevelopIds(developIds);
    }

    /**
     * 删除开发商列表信息
     * 
     * @param developId 开发商列表主键
     * @return 结果
     */
    @Override
    public int deleteDeveloperByDevelopId(Long developId)
    {
        return developerMapper.deleteDeveloperByDevelopId(developId);
    }
}
